<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Food/Fproductunit.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Food/Fproductunit.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'unit_id',
                    footer: "Foots",
                    cnName: '单位配置',
                    name: 'Fproductunit',
                    url: "/Fproductunit/",
                    sortName: "unit_id"
                },
                extend: extend,
                editFormFields: {supplierCode: "","unit_name":"","sort":""},
                editFormOptions: [
                              [
                                {
                                  dataKey: "mall_supplier",
                                  data: [],
                                  title: "供应商名称",
                                  required: true,
                                  field: "supplierCode",
                                  type: "select",
                                },
                              ],
                              [{"title":"属性名","required":true,"field":"unit_name","type":"text"}],
                              [{"title":"排序","field":"sort","type":"number"}]],
                searchFormFields: {"unit_name":""},
                searchFormOptions: [[{"title":"属性名","field":"unit_name","type":"text"}]],
                columns: [
                  // {field:'unit_id',title:'ID',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                      {field:'supplierCode',title:'供应商',type:'string',width:120,align:'left',bind: {
                        key: "mall_supplier",
                        data: [],
                        },
                      },
                       {field:'unit_name',title:'属性名',type:'string',width:120,require:true,align:'left',sortable:true},
                       {field:'sort',title:'排序',type:'int',width:90,require:true,align:'left'},
                      //  {field:'app_id',title:'应用id',type:'int',width:90,require:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:80,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:190,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:80,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:190,align:'left',sortable:true},

                      //  {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
                      //  {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
                      ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
